import request from '@/utils/request'

// 查询用户通告阅读标记列表
export function listSend(query) {
  return request({
    url: '/message/send/list',
    method: 'get',
    params: query
  })
}

// 查询用户通告阅读标记详细
export function getSend(id) {
  return request({
    url: '/message/send/' + id,
    method: 'get'
  })
}

// 新增用户通告阅读标记
export function addSend(data) {
  return request({
    url: '/message/send',
    method: 'post',
    data: data
  })
}

// 修改用户通告阅读标记
export function updateSend(data) {
  return request({
    url: '/message/send',
    method: 'put',
    data: data
  })
}

// 删除用户通告阅读标记
export function delSend(id) {
  return request({
    url: '/message/send/' + id,
    method: 'delete'
  })
}

// 查看按钮更改阅读状态
export function readStatus(anntId){
  return request({
    url:'/message/send/editByAnntIdAndUserId/' + anntId ,
    method:'put'
  })
}

// 一键已读
export function readAll(){
  return request({
    url:'/message/send/readAll',
    method:'put'
  })
}
